package com.ebupt.migu.music.statistics.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.ebupt.migu.music.statistics.entity.PushResult;
import com.ebupt.migu.music.statistics.entity.StatisticsPush;
import com.ebupt.migu.music.strategy.entity.StrategyInfo;
import com.ebupt.migu.music.userGroup.entity.UserGroupInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
@DS("mysql_mg")
public interface StatisticsPushTaskMapper {

    /**
     * 查询已推送的PUSH策略详情
     */
    List<StrategyInfo> queryStrategyPushList();
    /**
     * 查询已推送的PUSH策略详情
     * @param params
     */
    int createStatisPush(Map<String, Object> params);
    /**
     * 根据strategyId获取push统计
     * @param params
     */
    List<StatisticsPush>  queryStatisticsPush(Map<String, Object> params);
    /**
     * 更新push统计
     * @param params
     */
    int updateStatisPush(Map<String, Object> params);
    /**
     * 查询人群
     * @param paramMap
     */
    List<UserGroupInfo> queryByGroupId(Map<String, Object> paramMap);
    /**
     * 查询已推送的PUSH策略
     * @return
     */
    List<PushResult> queryPushResultList();
    /**
     * 根据策略id查询策略
     * @return
     */
    List<StrategyInfo> queryByStrategyId(Map<String, Object> paramMap);
    /**
     * 更新push推送的统计结果获取状态
     * @return
     */
    int updatePushResultStatus(Map<String, Object> paramMap);


    int selectByTaskId(String taskId);

    /**
     * 查询某一天已推送的PUSH策略
     * @param pushDate
     * @return
     */
    List<PushResult> queryPushResultListByPushDate(String pushDate);
}
